package com.hadoop.mr.sort;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Partitioner;

public class AllSortPartitioner extends Partitioner<IntWritable, IntWritable>{

	@Override
	public int getPartition(IntWritable key, IntWritable value, int numPartitions) {
		if(key.get() < 99){
			return 0;
		} else if (key.get() <999){
			return 1;
		} else {
			return 2;
		}
	}
	
}
